package net.jiastudy.biz.sys.entity;

import javax.validation.constraints.NotEmpty;

import io.swagger.annotations.ApiModelProperty;
import net.jiastudy.biz.enums.DeptType;
import net.jiastudy.core.base.BaseEntity;

public class Dept extends BaseEntity<Dept> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@NotEmpty(message = "代码不能为空")
	@ApiModelProperty(value = "代码")
	private String code;
	@NotEmpty(message = "名称不能为空")
	@ApiModelProperty(value = "名称")
	private String name;
	private Boolean disable;
	@ApiModelProperty(value = "类型")
	private DeptType type;

	private Integer seq;

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getDisable() {
		return disable;
	}

	public void setDisable(Boolean disable) {
		this.disable = disable;
	}

	public DeptType getType() {
		return type;
	}
	
	public String getTypeDesc() {
		if (null == type) {
			return null;
		}
		return type.getDesc();
	}

	public void setType(DeptType type) {
		this.type = type;
	}

}
